package com.nine.entity;


/**
 * OrderitemId entity. @author MyEclipse Persistence Tools
 */

public class OrderitemId implements java.io.Serializable {

	// Fields

	private Order order;
	private Integer itemId;

	// Constructors

	/** default constructor */
	public OrderitemId() {
	}

	/** full constructor */
	public OrderitemId(Order order, Integer itemId) {
		this.order = order;
		this.itemId = itemId;
	}

	// Property accessors

	public Order getOrder() {
		return this.order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

	public Integer getItemId() {
		return this.itemId;
	}

	public void setItemId(Integer itemId) {
		this.itemId = itemId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof OrderitemId))
			return false;
		OrderitemId castOther = (OrderitemId) other;

		return ((this.getOrder() == castOther.getOrder()) || (this.getOrder() != null
				&& castOther.getOrder() != null && this.getOrder().equals(
				castOther.getOrder())))
				&& ((this.getItemId() == castOther.getItemId()) || (this
						.getItemId() != null
						&& castOther.getItemId() != null && this.getItemId()
						.equals(castOther.getItemId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getOrder() == null ? 0 : this.getOrder().hashCode());
		result = 37 * result
				+ (getItemId() == null ? 0 : this.getItemId().hashCode());
		return result;
	}

}